#![allow(non_camel_case_types, non_snake_case)]
use crate::decl::*;
use crate::kernel::ffi_types::*;
use crate::ole::privs::*;
use crate::prelude::*;
use crate::vt::*;
#[repr(C)]
pub struct IBindCtxVT {
pub IUnknownVT: IUnknownVT,
pub RegisterObjectBound: fn(COMPTR, COMPTR) -> HRES,
pub RevokeObjectBound: fn(COMPTR, COMPTR) -> HRES,
pub ReleaseBoundObjects: fn(COMPTR) -> HRES,
pub SetBindOptions: fn(COMPTR, PVOID) -> HRES,
pub GetBindOptions: fn(COMPTR, PVOID) -> HRES,
pub GetRunningObjectTable: fn(COMPTR, *mut COMPTR) -> HRES,
pub RegisterObjectParam: fn(COMPTR, PCSTR, COMPTR) -> HRES,
pub GetObjectParam: fn(COMPTR, PCSTR, *mut COMPTR) -> HRES,
pub EnumObjectParam: fn(COMPTR, *mut COMPTR) -> HRES,
pub RevokeObjectParam: fn(COMPTR, PCSTR) -> HRES,
}
com_interface! { IBindCtx: "0000000e-0000-0000-c000-000000000046";
}
impl ole_IBindCtx for IBindCtx {}
pub trait ole_IBindCtx: ole_IUnknown {
fn_com_noparm! { ReleaseBoundObjects: IBindCtxVT;
}
fn RevokeObjectParam(&self, key: &str) -> HrResult<()> {
ok_to_hrresult(
unsafe {
(vt::<IBindCtxVT>(self).RevokeObjectParam)(
self.ptr(),
WString::from_str(key).as_ptr(),
)
},
)
}
}